package com.demo.crm.springboot3security.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.mybatisflex.core.audit.AuditManager;

@Configuration
public class MyBatisFlexConfig {

    @Bean
    public void configMybatisFlex() {
        // 开启SQL审计功能
        AuditManager.setAuditEnable(true);

        // 设置SQL审计处理器
//        AuditManager.setMessageHandler(auditMessage -> {
//            String sql = auditMessage.getFullSql();
//            System.out.println("SQL: " + sql);
//        });
    }
}